#编写自动化脚本
#1打开浏览器_驱动管理
import time
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.ie.service import Service
from webdriver_manager.chrome import ChromeDriverManager

# chromeIns=ChromeDriverManager().install()
# #创建谷歌浏览器驱动
# driver=webdriver.Chrome(service=Service(chromeIns))
# time.sleep(2)
# #2、输入网站https://www.baidu.com(网站一定要完整)
# driver.get("https://www.baidu.com")
# time.sleep(2)
# #3、找到百度网址,在输入框中输入迪丽热巴
# driver.find_element(By.CSS_SELECTOR,"#kw").send_keys("张宏")
# time.sleep(2)
# #4、点击百度按钮
# driver.find_element(By.CSS_SELECTOR,"#su").click()
# time.sleep(2)
# #5、关闭浏览器
# driver.quit()



